package sk.fhi.server.handler;

import net.customware.gwt.dispatch.server.ExecutionContext;
import net.customware.gwt.dispatch.shared.DispatchException;
import sk.fhi.shared.rpc.action.DeleteAction;
import sk.fhi.shared.rpc.result.DeleteResult;

public class DeleteHandler extends AbstractActionHandler<DeleteAction, DeleteResult>{


	@Override
	public DeleteResult execute(DeleteAction action, ExecutionContext arg1)
			throws DispatchException {
		crudService.delete(action.getKind().getClass(), action.getIds());
		return new DeleteResult();
	}

	@Override
	public Class<DeleteAction> getActionType() {
		return DeleteAction.class;
	}

}
